1. Field of Invention
The present invention relates generally to computing systems. More particularly, the present invention relates to a virtual machine on which more than one application may run at substantially any given time.
2. Description of the Related Art
As the use of object-based computing systems increases, the use of virtual machines which run with respect to computing systems is becoming more prevalent. A virtual machine may generally be considered to be self-contained operating environment that functions as if it were a separate computing system. By way of example, a virtual machine may be software which acts as an interface between a computer program, e.g., compiled binary code, and a processor which is arranged to execute instructions specified by the computer program.
In general, a virtual machine includes an engine which enables an application or, more specifically, program codes, to be executed by computer hardware. Standard virtual machines engines include components such as an interpreter and a class loader, as will be understood by those skilled in the art. An interpreter perform operations defined byte codes as each byte code is read into the interpreter. A class loader loads classes needed to complete a particular job using the virtual machine.
Virtual machines only support the execution of one application per virtual machine process. In other words, when more than one application is to be executed substantially concurrently, then more than one virtual machine must be started such that each application has its own instance of a virtual machine, i.e., only one application may be executed per virtual machine process. A job is started on a virtual machine for each application. The initialization of a virtual machine generally causes significant performance penalty. In particular, the loading of all classes related to a launched application when a virtual machine is initialized causes a substantial performance penalty.
When multiple virtual machines are initialized to enable more than one application to execute, the existence of the multiple virtual machines is typically relatively expensive. For example, running two virtual machines and, hence, two separate processes on a device with limited memory such as a personal digital assistant may be expensive as much of the limited memory may be used by the two virtual machines. The limited memory may be occupied by the virtual machines themselves. Further, although the virtual machines may utilize common classes, a set of classes is generally resident in memory for each virtual machine. Hence, the limited memory resources are often further used by duplicate classes. In other words, a significant amount of memory is often wasted, as each virtual machine process loads and keeps in memory its own copy of “core” classes, although the majority of the core classes may generally be shared by separate instances of a virtual machine.
A virtual machine typically does not enable applications to be readily persisted, e.g., states associated with the applications may not be readily stored. In order to persist an application, an application programmer must typically explicitly persist the application. That is, the application must “know” how to save its own state or states. By way of example, an application that is started on a personal digital assistant may not be persisted and transferred to another personal digital assistant unless that application includes code specifically associated with persisting the application. The lack of the ability to readily persist data hinders the portability of applications, as will be understood by those skilled in the art.
Typically, a virtual machine is monolithic. That is, a virtual machine is effectively a non-modular system. Hence, when it becomes necessary to alter a line of code associated with the virtual machine, it may be necessary to alter additional lines accordingly. However, in many cases, the identification of additional lines which need to be altered may not be possible until after an error occurs in the execution of the virtual machine. Such an error is likely to cause an overall failure of the virtual machine, as a monolithic virtual machine is generally not robust.
Therefore, what is needed is a virtual machine which does not waste memory or resources, enables applications to be persisted, and is relatively easy to modify. That is, what is desired is an efficient virtual machine.